<h1>Plans#show</h1>
<p>Find me in app/views/plans/show.html.erb</p>
<p>Some detail about your plan</p>

<hr>

<h3>Comments</h3>

<% @plan.comments.each do |comment| %>
    <p>
    <%=h comment.body %>
    </p>
<% end %>

<% form_for(:comment, :url=> plan_comments_path(@plan)) do |f| %>
    <%= f.hidden_field :user_id %>

    <p>Comment:<br/>
    <%= f.text_area :body %>
    </p>
    <%= f.submit "Create" %>

<% end %>

<% form_for(:planned_course, :url=> planned_courses_path, :method=> :post) do |f| %>
<p><%= collection_select(:planned_course, :course_id, Course.find(:all), :id, :display_name, {:prompt => true})%></p>

 <%= f.hidden_field :plan_id, :value => @plan.id %> 
 
<select name="planned_course[term]">
    <option value="">Select Term</option>
    <option value="1" selected="selected">1A</option>
    <option value="2">1B</option>
    <option value="3">2A</option>
    <option value="3">2B</option>
    <option value="3">3A</option>
    <option value="3">3B</option>
    <option value="3">4A</option>
    <option value="3">4B</option>
  </select>

    <%= f.submit "Add Course" %>

<% end %>




<p><%= link_to 'Back', plans_url %>
